<template>
<div>
   <el-breadcrumb separator="/">
  <el-breadcrumb-item :to="{ path: '/home' }">首页</el-breadcrumb-item>
  <el-breadcrumb-item>角色管理</el-breadcrumb-item>
</el-breadcrumb>
 <el-button plain  @click="add">添加</el-button>

<vList @edit ='edit' />
<vDialog :isShow='isShow' @cancel='cancel' ref="roleRef" :isAdd='isAdd'/>
</div>
</template>

<script>
import vList from './list'
import vDialog from './dialog'
export default {
  components: {
    vList, vDialog

  },
  data () {
    return {
      isShow: false,
      isAdd: true
    }
  },
  methods: {
    add () {
      this.isShow = true
    },
    cancel (e) {
      this.isShow = e
    },
    // list 页面编辑  通知diog 数据回显
    edit (id) {
      this.isAdd = false
      this.isShow = true
      this.$refs.roleRef.lookup(id)
    }
  }
}
</script>

<style>

</style>
